package metamodel.transformer;

import metamodel.*;

import java.util.Collection;

/**
 * User: felix
 * Date: 10.06.2005
 */
public interface TopDownGraphTransformer {
    public Object visitRecord(ClassNode classNode, Object data, Object parent);
    public void visitFlatProperty(FlatProperty p, Object value, Object parent);
    public Object visitObjectReference(ObjectReference objectReference, Object value, Object parent);
    public Collection visitCollection(CollectionRef collectionRef, Collection value, Object parent);
    public Object visitCollectionElement(CollectionRef collectionRef, int index,Object value, Collection parent);

    /** the visitor discovered a cycle, the enclosing instance is delivered */
    public void visitCyclic(Property property, Object enclosing, Object parent);
}
